import Vue from 'vue'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

import Index from './component/Index';

import http from './http/http.js';
import authorityService from './service/AuthorityService.js';
import router from './router/router.js';



Vue.use(ElementUI);


/**
 * 启动VUE
 */
Vue.config.productionTip = true;

(async function startApp(container) {
  await authorityService.initAuthority(http);
  let vue = new Vue({el: container, router, components: {Index}, template: '<Index/>'})
  window.alert = vue.$message.info;
  window.error = vue.$message.error;
  return vue;
})("#app")

